#define _CRT_SECURE_NO_WARNINGS 1


#include<stdio.h>
int main ()
{
    int arr[50] = {0};
    int n = 0;
    int i = 0;
    int j = 0;
    int tmp = 0;
    scanf("%d",&n);
    getchar();
    for(i=0;i<n;i++)
    {
        scanf("%d",&arr[i]);
    }
    getchar();
    scanf("%d",&arr[n]);
    for(i=0;i<n;i++)
    {
        for(j=0;j<n-i;j++)
        {
            if(arr[j] > arr[j+1])
            {
                tmp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = tmp;
            }
        }    
    }
    for(i=0;i<n+1;i++)
    {
        printf("%d ",arr[i]);
    }
    return 0;
}

